package com.imsprint.javamvp.dagger2user.di;

import com.imsprint.javamvp.dagger2user.bean.User;

import javax.inject.Singleton;

import dagger.Module;
import dagger.Provides;

@Module
public class MainModule {

//    @Provides
//    public User getUser(){
//        User user = new User();
//        user.setName("小明");
//        user.setAge(12);
//        return user;
//    }

    @Singleton
    @Provides
    public User getUser(){
        return new User("小红",12);
    }

    public User getUser(String name,int age){
        return new User(name,age);
    }

}
